package interfaces;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.HashMap;

public interface Order extends Remote {
	/**
	 * Returns the Order id
	 * 
	 * @return
	 * @throws RemoteException
	 */
	public int getId() throws RemoteException;
	
	/**
	 * Adds a Product to the products list
	 * 
	 * @param product	Product to be added
	 * @param amount
	 * @throws RemoteException
	 */
	public void add( Product product, double amount ) throws RemoteException;
	
	/**
	 * Returns True if the specified Product exists in the product list
	 * 
	 * @param product	Product
	 * @return
	 * @throws RemoteException
	 */
	public boolean productExists( Product product ) throws RemoteException;
	
	/**
	 * Removes a Product from the products list
	 * 
	 * @param product	Product to be removed
	 * @throws RemoteException
	 */
	public void remove( Product product ) throws RemoteException;
	
	/**
	 * Returns the products list
	 * 
	 * @return
	 * @throws RemoteException
	 */
	public HashMap<Product, Double> getProducts() throws RemoteException;
	
	/**
	 * Returns the total price for the Order
	 * 
	 * @return
	 * @throws RemoteException
	 */
	public double getTotal() throws RemoteException;
}
